package cn.lili.controller.feign;

import cn.lili.modules.broadcast.service.CommodityService;
import cn.lili.modules.goods.client.CommodityClient;
import cn.lili.modules.goods.entity.dos.Commodity;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author paulG
 * @since 2022/1/14
 **/
@RestController
@RequiredArgsConstructor
public class CommodityFeignController implements CommodityClient {

    private final CommodityService commodityService;

    /**
     * 添加直播商品
     *
     * @param commodity 直播商品列表
     * @return 添加结果
     */
    @Override
    public boolean addCommodity(List<Commodity> commodity) {
        return commodityService.addCommodity(commodity);
    }

    /**
     * 查询微信小程序直播商品审核状态
     */
    @Override
    public void getGoodsWareHouse() {
        commodityService.getGoodsWareHouse();
    }

    @Override
    public boolean deleteCommodity(String goodsId) {
        return commodityService.deleteCommodity(goodsId);
    }
}
